﻿using System;

namespace SharpBase.Web
{
    /// <summary>
    /// Represents a form parameter name/value pair
    /// </summary>
    public class WebFormNameValuePair
    {
        private string _Name;
        /// <summary>
        /// Gets/sets the name of the web form parameter
        /// </summary>
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        private string _Value;
        /// <summary>
        /// Gets/sets the value of the web form parameter
        /// </summary>
        public string Value
        {
            get { return _Value; }
            set { _Value = value; }
        }

        /// <summary>
        /// Initializes the web form parameter with the specified name
        /// </summary>
        /// <param name="name">Name of the web form parameter</param>
        public WebFormNameValuePair(string name)
            : this(name, String.Empty)
        { }

        /// <summary>
        /// Initializes the web form parameter with the specified name and value
        /// </summary>
        /// <param name="name">Name of the web form parameter</param>
        /// <param name="value">Value of the web form parameter</param>
        public WebFormNameValuePair(string name, string value)
        {
            _Name = name;
            _Value = value;
        }
    }
}
